package com.bort.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bort.system.model.Menu;
import com.bort.system.model.vo.MenuVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface MenuMapper extends BaseMapper<Menu> {

    int deleteByPrimaryKey(Integer id);

    int insertSelective(Menu record);

    Menu selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Menu record);

    int updateByPrimaryKey(Menu record);

    List<MenuVo> selectAllMenus();

    List<Menu> selectUserAuthorizedMenus(Integer id);

    List<Menu> getMenuList(@Param("map") Map<String, Object> map, Page<Menu> pager);
    List<Menu> getMenuList(@Param("map") Map<String, Object> map);
}